﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BW.MesProject.Public.Domain.RBAC
{
    /// <summary>
    /// 角色实体
    /// </summary>
    [SugarTable("RoleModel")]
    public class RoleModel:BaseEntity
    {
        /// <summary>
        /// 角色名称
        /// </summary>
        [MaxLength(30)]
        [SugarColumn(IsNullable = true)]
        public string RoleName { get; set; }

        /// <summary>
        /// 该角色下的所有用户
        /// </summary>
        //[Navigate(NavigateType.OneToMany, nameof(UserModel.RoleId))]
        //[SugarColumn(IsNullable = true)]
        //public List<UserModel> Users { get; set; }
    }
}
